import request from '@/utils/request'

// 类型定义
export interface LoginParams {
    username: string
    password: string
}

export interface RegisterParams {
    username: string
    password: string
    email: string
}


export const loginAPI = (data: LoginParams) =>
    request.post('/api/user_login', data)

export const registerAPI = (data: RegisterParams) =>
    request.post('/api/user_register', data)